package oboe.util;

/**
 * ...
 * @author Felipe Manga
 */

 import oboe.core.ISigSlot;
 import oboe.core.SigSlot;

class ISigSlotHelper 
{
	
	public static inline function message( ss:ISigSlot, name:String, arguments:Array<Dynamic> ):Void
	{
		Reflect.field( ss, "sigslot" ).message( name, arguments );
	}
	
	public static inline function signalDown( ss:ISigSlot, name:String, arguments:Array<Dynamic> ):Void
	{
		Reflect.field( ss, "sigslot" ).signalDown( name, arguments );
	}
	
	public static inline function signalUp( ss:ISigSlot, name:String, arguments:Array<Dynamic> ):Void
	{
		Reflect.field( ss, "sigslot" ).signalUp( name, arguments );
	}
	
	public static inline function shortSignal( ss:ISigSlot, name:String, arguments:Array<Dynamic> ):Void
	{
		Reflect.field( ss, "sigslot" ).shortSignal( name, arguments );
	}

	public static inline function broadcastSignal( ss:ISigSlot, name:String, arguments:Array<Dynamic> ):Void
	{
		Reflect.field( ss, "sigslot" ).broadcastSignal( name, arguments );
	}

	public static inline function init( owner:ISigSlot, child:ISigSlot ):Void
	{
		SigSlot.initSigSlot( owner, child );
	}
	
	public static inline function addChild( ss:ISigSlot, c:ISigSlot ):Void
	{
		Reflect.field( ss, "sigslot" ).addChild( c );
	}

	public static inline function removeChild( ss:ISigSlot, c:ISigSlot ):Void
	{
		Reflect.field( ss, "sigslot" ).removeChild( c );
	}
}